package app.lockenabler;

import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.widget.Toast;

public class Options extends Activity {
	public static String getDevice(){
		return android.os.Build.MODEL;
		//return "htc desire";
	}
	
	public static boolean getSettingsBoolean(String s, boolean b, Context c){
		SharedPreferences get_settings = PreferenceManager.getDefaultSharedPreferences(c);
		boolean get = get_settings.getBoolean(s, b);
		return get;
	}
	
	public static void setSettingsBoolean(String s, boolean b, Context c){
 	   	SharedPreferences set_settings = PreferenceManager.getDefaultSharedPreferences(c);
 	   	SharedPreferences.Editor set = set_settings.edit();
 	   	set.putBoolean(s, b);
 	   	set.commit();
	}
	
	public static int getSettingsInt(String s, int i, Context c){
		SharedPreferences get_settings = PreferenceManager.getDefaultSharedPreferences(c);
		int get = get_settings.getInt(s, i);
		return get;
	}
	
	public static void setSettingsInt(String s, int i, Context c){
 	   	SharedPreferences set_settings = PreferenceManager.getDefaultSharedPreferences(c);
 	   	SharedPreferences.Editor set = set_settings.edit();
 	   	set.putInt(s, i);
 	   	set.commit();
	}
	
	public static void mess(String s, Context c){
		Toast.makeText(c, s, Toast.LENGTH_SHORT).show();
	}
}
